package com.bhs.sansong.adapter;

import androidx.annotation.NonNull;

import com.bhs.sansong.R;
import com.bhs.sansong.bean.DiscountCouponBean;
import com.bhs.sansong.utils.MyUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

/**
 * 公司优惠券
 */
public class DiscountCouponAdapter extends BaseQuickAdapter<DiscountCouponBean, BaseViewHolder> {

    public DiscountCouponAdapter() {
        super(R.layout.item_discount_coupon);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, DiscountCouponBean item) {
        helper.setText(R.id.tv_bond_price,MyUtils.checkPoint(item.getCoupon_price()));
        helper.setText(R.id.tv_full_subtraction,String.format("满%s减%s", MyUtils.checkPoint(item.getCoupon_min_price()),MyUtils.checkPoint(item.getCoupon_price())));
    }
}
